import { generateRandomId } from '@/utils';
import type { BaseTableConfig } from '@/components/base-ui/base-table/type';

export const tableConfig: BaseTableConfig = {
    items: [
        {
            modelKey: 'name',
            elInputProps: {
                placeholder: '请输入工作时段名称',
                maxlength: '50',
                showWordLimit: true
            },
            columnProps: {
                label: '工作时段名称',
                width: 240
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'time',
            modelKey: 'grade1',
            elTimePickerProps: {
                isRange: true,
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                rangeSeparator: '-',
                startPlaceholder: '开始时间',
                endPlaceholder: '结束时间'
            },
            columnProps: {
                label: '选择时段1',
                width: 280
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'time',
            modelKey: 'grade2',
            elTimePickerProps: {
                isRange: true,
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                rangeSeparator: '-',
                startPlaceholder: '开始时间',
                endPlaceholder: '结束时间'
            },
            columnProps: {
                label: '选择时段2',
                width: 280
            },
            validProps: {
                id: generateRandomId()
            }
        },
        {
            modelKey: 'grade3',
            itemType: 'time',
            elTimePickerProps: {
                isRange: true,
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                rangeSeparator: '-',
                startPlaceholder: '开始时间',
                endPlaceholder: '结束时间'
            },
            columnProps: {
                label: '选择时段3',
                width: 280
            },
            validProps: {
                id: generateRandomId()
            }
        },
        {
            itemType: 'time',
            modelKey: 'grade4',
            elTimePickerProps: {
                isRange: true,
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                rangeSeparator: '-',
                startPlaceholder: '开始时间',
                endPlaceholder: '结束时间'
            },
            columnProps: {
                label: '选择时段4',
                width: 280
            },
            validProps: {
                id: generateRandomId()
            }
        }
    ],
    unAction: true
};
